num=100


def convertToBase7(num):
    res=""
    isF=False
    if num<0:
        #带负号
        isF=True
        num=abs(num)
    while num!=0:
        res=str(num%7)+res
        num=int(num/7)
    if isF:
        res="-"+res
    print(res)

convertToBase7(num)

